import request from '@/utils/request.js';

const API = {
    // 获取工作室信息
    GET_STUDIO_List_URL: '/v1/studio/choice/getSelection?pageNo=1&pageSize=100',
    GET_ALL_STUDIO_URL: '/v1/studio/choice/getAllStudio',
    // 导出工作室表格
    EXPORT_STUDIO_TABLE_URL: '/v1/studio/choice/exportExcel'
};

// 获取工作室信息
export const reqStudioList = params =>
    request.get(API.GET_STUDIO_List_URL, params);

// 不使用了
export const reqAllStudio = () => request.get(API.GET_ALL_STUDIO_URL);

// 导出工作室表格
export const reqExportTable = id =>
    request.get(`${API.EXPORT_STUDIO_TABLE_URL}?teaNum=${id}`, {
        responseType: 'arraybuffer' // 或 'blob'
    });
